﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Aeroporto.controle;
using Aeroporto.modelo;
using Aeroporto.bd;
using System.Collections;

using Aeroporto.visao;

namespace Aeroporto.visão
{
    public partial class formComp : Form
    {
        formCadastroVoo voos = null;
        formAgenciaViagem reservas = null;        

        public formComp(string comp)
        {            
            voos = new formCadastroVoo(comp);
            reservas = new formAgenciaViagem(comp);

            this.voos.FormBorderStyle = this.reservas.FormBorderStyle = FormBorderStyle.None;            
            this.voos.TopLevel = this.reservas.TopLevel = false;
            this.voos.Parent = this.reservas.Parent = this;
            this.voos.Dock = this.reservas.Dock = DockStyle.Fill;

            this.voos.Show();
            this.reservas.Show();
            
            InitializeComponent();
            tabPage1.Controls.Add(this.voos);
            tabPage2.Controls.Add(this.reservas);
            this.Text = comp;           
        }                                    
        
        private void formComp_Load(object sender, EventArgs e)
        {

        }

        private void tabPage1_Click(object sender, EventArgs e)
        {

        }

        private void formComp_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }

        private void formComp_Load_1(object sender, EventArgs e)
        {

        }
    }
}
